cmake_minimum_required(VERSION 3.0.2)
project(tcp2modbus)


find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  speed_msg
)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )


catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES tcp2modbus
#  CATKIN_DEPENDS roscpp rospy std_msgs
#  DEPENDS system_lib
)


include_directories(
  ${catkin_INCLUDE_DIRS}
  ./include
)

file(GLOB_RECURSE CPP_FILES     
${PROJECT_SOURCE_DIR}/src/*.cc 
${PROJECT_SOURCE_DIR}/src/*.cpp
)

 add_executable(${PROJECT_NAME}_node ${CPP_FILES})

 add_dependencies(${PROJECT_NAME}_node speed_msg_generate_messages_cpp)#这个写法拼接很有意思

 target_link_libraries(${PROJECT_NAME}_node
  ${catkin_LIBRARIES}
  event
 )

